Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

👌 IMPROVE: Master doc title specified in _toc.yml is visible in left-sidebar #304

Closed

Conversation

AakashGfude
Copy link
Member

@AakashGfude AakashGfude commented Mar 18, 2021

As outlined in this issue jupyter-book/jupyter-book#1012 , master_doc title specified with title key in _toc.yml was not reflecting in the left sidebar. This PR fixes that.

Example:

- file: intro
  title: This is the intro
   ....
   ....

results in:-

Screen Shot 2021-03-18 at 2 40 00 pm

@choldgraf, the test infrastructure in this repo uses sphinx-build as it is jb agnostic. So, I won't be able to test this feature( which is directed only towards jb projects) here right?

fixes jupyter-book/jupyter-book#1012

@AakashGfude AakashGfude reopened this Mar 18, 2021
# check title in globaltoc (jb case) else get title from doctree
master_title = None
with suppress(Exception):
master_title = app.config["globaltoc"].get("title")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note this won't work quite the same with jupyter-book/jupyter-book#1293. But I would be interested if there is a less theme specific solution that could go straight into sphinx-external-toc 🤔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chrisjsewell you mean creating a global variable in sphinx-external-toc which has this value? and can be accessed directly in any theme.

@choldgraf
Copy link
Member

It seems like this one is a bit stale - and maybe addressed at the sphinx-external-toc level? I'll close it so that we have less cruft to worry about in a refactor, but we can re-visit if this issue still persists

@choldgraf choldgraf closed this Jan 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TOC title ignored for first page
3 participants